/***************************************************************
 * Name:      GUIMain.h
 * Purpose:   Defines Application Frame
 * Author:    Robotnik Automation (mrodriguez@robotnik.es)
 * Created:   2012-03-02
 * Copyright: Robotnik Automation (http://www.robotnik.eu/)
 * License:
 **************************************************************/

#ifndef GUIMAIN_H
#define GUIMAIN_H

#include <wx/scrolbar.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>

//(*Headers(GUIFrame)
#include <wx/menu.h>
#include <wx/statusbr.h>
#include <wx/frame.h>
#include <wx/timer.h>
//*)

#include "RosInterface.h"
#include "ProcessManager.h"

class GUIFrame: public wxFrame
{
    public:

        RosInterface *Ri;
        ProcessManager *PM;

        GUIFrame(wxWindow* parent, wxWindowID id = -1);
        virtual ~GUIFrame();

    private:

        wxTextCtrl* arm_name_box[7];
        wxTextCtrl* arm_pos_box[7];
        wxTextCtrl* arm_vel_box[7];

        wxTextCtrl* sdh_name_box[7];
        wxTextCtrl* sdh_pos_box[7];
        wxTextCtrl* sdh_vel_box[7];

        wxTextCtrl* torso_name_box[3];
        wxTextCtrl* torso_pos_box[3];
        wxTextCtrl* torso_vel_box[3];

        wxTextCtrl* tray_name_box[1];
        wxTextCtrl* tray_pos_box[1];
        wxTextCtrl* tray_vel_box[1];

        wxTextCtrl* head_name_box[1];
        wxTextCtrl* head_pos_box[1];
        wxTextCtrl* head_vel_box[1];

        //(*Handlers(GUIFrame)
        void OnQuit(wxCommandEvent& event);
        void OnAbout(wxCommandEvent& event);
        void OnClose(wxCloseEvent& event);
        void OnScrollBar1Scroll(wxScrollEvent& event);
        void OnTimer1Trigger(wxTimerEvent& event);
        void OnBitmapButton1Click(wxCommandEvent& event);
        void OnMenuItem3Selected(wxCommandEvent& event);
        void stereo_left_cam(wxCommandEvent& event);
        void stereo_right_cam(wxCommandEvent& event);
        void skype_call(wxCommandEvent& event);
        void manual_control(wxCommandEvent& event);
        void automatic_control(wxCommandEvent& event);
        void run_rviz(wxCommandEvent& event);
        void run_OpenRAVE(wxCommandEvent& event);
        //*)

        //(*Identifiers(GUIFrame)
        static const long idMenuQuit;
        static const long ID_MENUITEM4;
        static const long ID_MENUITEM5;
        static const long id_cam_left;
        static const long id_cam_right;
        static const long ID_MENUITEM2;
        static const long ID_MENUITEM3;
        static const long ID_MENUITEM1;
        static const long idMenuAbout;
        static const long ID_STATUSBAR1;
        static const long ID_TIMER1;
        //*)

        //(*Declarations(GUIFrame)
        wxStatusBar* StatusBar1;
        wxMenu* Menu3;
        wxMenuItem* Menu8;
        wxMenuItem* Menu5;
        wxMenuItem* Menu10;
        wxMenu* Menu6;
        wxMenu* Menu9;
        wxTimer Timer1;
        wxMenuItem* MenuItem3;
        wxMenu* Menu4;
        wxMenuItem* Menu7;
        wxMenuItem* MenuItem4;
        wxMenuItem* Menu11;
        //*)

        DECLARE_EVENT_TABLE()
};

#endif // GUIMAIN_H
